home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / PipeMan - 263389122001.psc / modMain.bas < prev    next >
Encoding:
BASIC Source File  |  2001-09-12  |  2.4 KB  |  74 lines

  1. Attribute VB_Name = "modMain"
  2. Sub Main()
  3.   frmStartUp.Picture = LoadResPicture("STARTLOGO", 0)
  4.   frmStartUp.Show
  5.   DoEvents
  6.   ElapsedTime = MSTimer
  7.   Randomize MSTimer
  8.   
  9.   PipeSize = 32 * Screen.TwipsPerPixelX
  10.   
  11.   ChDir App.Path
  12.   
  13.   EmptyBoxes
  14.   frmMain.LogoLine.Picture = LoadResPicture("MENULINE", 0)
  15.   frmMain.LogoImg.Picture = LoadResPicture("MENULOGO", 0)
  16.   ReadPics GameOverPic(), "pipelogo.fdi", 0
  17.   ReadPics NextMapPic(), "pipelogo.fdi", 1
  18.   ReadPics PipeManPic(), "pipelogo.fdi", 2
  19.   ReadPics PausePic(), "pipelogo.fdi", 3
  20.   DrawBoxes
  21.   ResetField
  22.   
  23.   CreateTable "ABCDEFGHIJKLMNOPQRSTUVWXYZ ", Tables()
  24.   
  25.   Dim P As Integer
  26.   
  27.   For P = 1 To 10
  28.     HighScore(P).Player = Space(6)
  29.   Next
  30.   
  31.   LoadHiscore "hiscore.fdi"
  32.   
  33.   Dim X As Integer
  34.   Dim Y As Integer
  35.   
  36.   
  37.   For X = 0 To 10
  38.     For Y = 0 To 10
  39.       P = PausePic(X, Y)
  40.       frmMain.picPause.PaintPicture LoadResPicture(P, 0), X * PipeSize, Y * PipeSize
  41.     Next
  42.   Next
  43.   
  44.   Erase PausePic
  45.   
  46.   ShowPicture PipeManPic(), True
  47.   
  48.   frmMain.PSet (0, 0), RGB(172, 172, 162)
  49.   frmMain.Line (0, 1)-(0, frmMain.Height - 2 * Screen.TwipsPerPixelY), RGB(157, 156, 149)
  50.   frmMain.Line (1, 0)-(frmMain.Width - 2 * Screen.TwipsPerPixelY, 0), RGB(188, 187, 175)
  51.   frmMain.Line (frmMain.Width - 2 * Screen.TwipsPerPixelY, 0)-(frmMain.Width - 2 * Screen.TwipsPerPixelY, frmMain.Height - 2 * Screen.TwipsPerPixelY), RGB(188, 187, 175)
  52.   frmMain.Line (frmMain.Width - Screen.TwipsPerPixelY, 0)-(frmMain.Width - Screen.TwipsPerPixelY, frmMain.Height), RGB(119, 118, 106)
  53.   frmMain.Line (0, frmMain.Height - 2 * Screen.TwipsPerPixelY)-(frmMain.Width - Screen.TwipsPerPixelY, frmMain.Height - 2 * Screen.TwipsPerPixelY), RGB(157, 156, 149)
  54.   frmMain.Line (0, frmMain.Height - Screen.TwipsPerPixelY)-(frmMain.Width - Screen.TwipsPerPixelY, frmMain.Height - Screen.TwipsPerPixelY), RGB(57, 57, 55)
  55.   
  56.   frmMain.picAppBar.PaintPicture LoadResPicture("LOGOLEFT", 0), 0, 0
  57.   frmMain.picAppBar.PaintPicture LoadResPicture("LOGOMIDDLE", 0), 3810, 0, frmMain.picAppBar.Width - 3810
  58.   
  59.   frmMain.picControl(1).Picture = LoadResPicture("UPEXIT", 0)
  60.   frmMain.picControl(0).Picture = LoadResPicture("UPMINIMIZE", 0)
  61.   Load frmMain
  62.   
  63.   GameOver = True
  64.   
  65.   frmMain.lblGameInfo.Caption = "PipeMan - Andreas Svensson"
  66.   
  67.   Do While ElapsedTime + 1000 > MSTimer
  68.     DoEvents
  69.   Loop
  70.   
  71.   Unload frmStartUp
  72.   frmMain.Show
  73. End Sub
  74.